package com.firmboy.compo.scan;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试自动扫描
 *
 * @author firmboy
 * @create 2018-02-06 上午10:33
 **/
public class Application {

    public static void main(String[] args) throws Exception{
        ApplicationContext context =
                new ClassPathXmlApplicationContext(new String[] {"application.xml"});
        DruidDataSource dataSource = context.getBean("dataSource", DruidDataSource.class);

        DruidPooledConnection connection = dataSource.getConnection();

    }
}
